<template>
  <div class="image-gallery" v-ps>
    <ul class="image-gallery-list">
      <li v-for="item in data" :key="item.id">
        <ws-image-box
          :data="item"
          :preview="false"
          @delete="handleDelete">
        </ws-image-box>
      </li>
    </ul>
  </div>
</template>

<script>

import WsImageBox from './ImageBox'

export default {
  name: 'WsImageGallery',
  components: { WsImageBox },
  props: {
    data: {
      type: Array,
      default () {
        return []
      }
    }
  },
  data () {
    return {
    }
  },
  methods: {
    handleDelete (item, vm) {
      this.$emit('delete', item, this)
    }
  }
}
</script>
